import 'package:flutter_demo/pages/demos/dialog_utils_demo.dart';
import 'package:flutter_demo/pages/demos/search_demo.dart';
import 'package:flutter_demo/pages/demos/select_demo.dart';
import 'package:flutter_demo/widgets/list_title_widgets.dart';
import 'package:flutter/material.dart';

/// @author longzipeng
/// @创建时间：2022/3/30
/// 首页
class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("demo演示"),
      ),
      body: ListView(
        children: [
          ListTitleWidget(
              title: Text("下拉菜单"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (BuildContext context) {
                  return const SelectDemoPage();
                }));
              }),
          ListTitleWidget(
            title: Text("搜索框"),
            onTap: () {
              Navigator.of(context)
                  .push(MaterialPageRoute(builder: (BuildContext context) {
                return const SearchDemoPage();
              }));
            },
          ),
          ListTitleWidget(
            title: Text("弹窗、提示工具类"),
            onTap: () {
              Navigator.of(context)
                  .push(MaterialPageRoute(builder: (BuildContext context) {
                return const DialogUtilsDemoPage();
              }));
            },
          ),
          ListTitleWidget(
            title: Text("无点击事件"),
          ),
        ],
      ),
    );
  }
}
